
echo "后端打包开始"
mvn clean package

echo "前端打包开始"
cd ../front-admin || exit 1
npm run build:dev

echo "清理旧文件包开始"
ssh root@1.92.147.76 "cd /app/shitangguanli && sh stop-old.sh";

echo "上传新文件包"
cd ..
scp -r ./front-admin/dist/* root@1.92.147.76:/app/shitangguanli/front/
scp ./backend/ruoyi-admin/target/ruoyi-admin.jar root@1.92.147.76:/app/shitangguanli/backend/

echo "重启应用"
ssh root@1.92.147.76 "cd /app/shitangguanli/backend && sh start.sh";
